package com.bw.service;

import com.bw.bean.User;
import com.bw.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImp implements UserService {
    @Autowired
    UserDao userDao;
    public String login(String name, String password) {
        userDao.login(name,password);
        System.out.println("欢迎"+name+ "登录");
        return "欢迎"+name+ "登录";
    }

    public String add(User user) {
        userDao.add(user);
        System.out.println( "欢迎" +user.getName()+"添加");
        return "欢迎" +user.getName()+"添加";
    }
}
